local fl = {
	"npc_items_custom_.txt"
}
for i,v in ipairs(fl) do
	local file = io.open(v)
	local data = file:read("*a")
	file:close()
	local index = 3001

	local newData = string.gsub(data,"CMD_INDEX",function(str)
		index = index + 1
		return index
	end)
	local pt = v:find("%.",1)
	local fname = v:gsub("_%.",".")
	local file = io.open(fname,"w+")
	file:write(newData)
	file:flush()
	file:close()
	print(v .. " completed!")
end

print("--------------all completed!!!")